package com.fm.structure.list;

/**
 * @param <E> element type
 * @author finalmachine
 */
public class DoubleLinkedNode<E> {
    private E value;
    private DoubleLinkedNode<E> prev;
    private DoubleLinkedNode<E> next;

    public DoubleLinkedNode(E value, DoubleLinkedNode<E> prev, DoubleLinkedNode<E> next) {
        this.value = value;
        this.prev = prev;
        this.next = next;
    }

    public DoubleLinkedNode<E> getPrev() {
        return prev;
    }

    public void setPrev(final DoubleLinkedNode<E> prev) {
        this.prev = prev;
    }

    public DoubleLinkedNode<E> getNext() {
        return next;
    }

    public void setNext(final DoubleLinkedNode<E> next) {
        this.next = next;
    }

    public E getValue() {
        return value;
    }
}
